package com.student;

/**
 * 龚礼东
 * createtime: 2023/10/16
 * updatatime:
 */
public class Shopping {

    public static void main(String[] args) {
        /**
         * T恤    2  245
         * 运动鞋  1  370
         * 网球拍  2  245.5
         *
         * 2   8折
         */
        shopping(2,1,2,0.8);
    }
    public static <a,b,c,d> int shopping(int a, int b, int c, double d){
        double summain = a * 245 + b * 370 + c * 345.5;
        System.out.println("***********************消费单************************");
        System.out.println("购买物品    单价    个数     金额");
        System.out.println("T恤        ￥245    2      "+245*a);
        System.out.println("运动鞋      ￥370    2      "+370*b);
        System.out.println("运动鞋      ￥370    2      "+345.5*c);

        System.out.println("折扣：    8折");
        float sum = (float) (0.8*summain);
//        会员积分
        System.out.print("消费总金额为：       ￥");
        System.out.println(sum);
        int summapping = (int) (sum * 0.3);
        System.out.print("此次购物会员积分为：");
        System.out.println(summapping);
        return summapping;
    }
}
